<template>
  <el-dialog title="查看详情" :visible.sync="visible" width="887px" append-to-body custom-class="fen_control">
    <div style="display: flex;">
      <div style="width: 200px;">
        <div style="position: relative;">
          <!-- 站位图片 -->
          <img style="width: 100%;" src="">
          <svg-icon icon-class="fj_light_status" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;" />
        </div>
      </div>
      <el-form ref="form" :model="form1" label-width="80px" label-position="left" size="mini" style="flex:1;padding-left: 30px;">
        <div style="column-gap: 40px;column-rule: 1px solid #E9ECF0;column-count:3;">
          <el-form-item style="margin-bottom: 10px;" label="灯组名称" prop="equName">{{ form1.equName }}</el-form-item>
          <el-form-item style="margin-bottom: 10px;" label="安装位置" prop="locationName"> {{ form1.locationName }}</el-form-item>
          <el-form-item style="margin-bottom: 10px;" label="生产厂家" prop="produceCompany"> {{ form1.produceCompany }}</el-form-item>
          <el-form-item style="margin-bottom: 10px;" label="供应商" prop="supplier"> {{ form1.supplier }}</el-form-item>
          <el-form-item style="margin-bottom: 10px;" label="规格型号" prop="brand"> {{ form1.brand }}</el-form-item>
          <el-form-item style="margin-bottom: 10px;" label="购入价格" prop="price">{{ form1.price }}</el-form-item>
          <el-form-item style="margin-bottom: 10px;" label="生产日期" prop="produceDate"> {{ form1.produceDate }}</el-form-item>
          <el-form-item style="margin-bottom: 10px;" label="安装日期" prop="locationName"> {{ form1.locationName }}</el-form-item>
          <el-form-item style="margin-bottom: 10px;" label="质保期" prop="warranty"> {{ form1.warranty }}</el-form-item>
          <el-form-item style="margin-bottom: 10px;" label="ip地址" prop="ip"> {{ form1.ip }}</el-form-item>
          <!-- <el-form-item style="margin-bottom: 4px;" label="设备转速"> {{ form1.rotarySpeed }} 转/min</el-form-item> -->
          <!-- <el-form-item style="margin-bottom: 4px;" label="出口流速"> {{ form1.rotarySpeed }} 转/min</el-form-item> -->
          <el-form-item style="margin-bottom: 4px;" label="设备电流"> {{ form1.electricCurrent }} mA </el-form-item>
          <el-form-item style="margin-bottom: 4px;" label="设备电压"> {{ form1.electricTension }} v</el-form-item>
          <el-form-item style="margin-bottom: 4px;" label="照明度"> {{ form1.vibrationValue }} cd/m^3</el-form-item>
          <!-- <el-form-item style="margin-bottom: 4px;" label="震动值"> {{ form1.vibrationValue }} mm/s</el-form-item> -->
        </div>
      </el-form>
    </div>
    <div style="height:200px">
      <!-- <h3>运行趋势</h3> -->
      <!--  -->
      <LineChart />
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" size="small" @click="submitForm">提交</el-button>
      <el-button size="small" @click="cancel">取 消</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { getEqu } from '@/api/fjgs/equ'
import LineChart from '@/views/subsys_jd/statistics/components/LineChart.vue'
export default {
  components: {
    LineChart
  },
  data() {
    return {
      visible: false,
      tabPosition: '',
      cruent: '',
      form1: {},
      value1: []
    }
  },
  methods: {
    open(options) {
      this.visible = true
    },
    handEdit(index, row) {
      this.cruent = index
    },
    handleView(row) {
    //   this.reset()
      const id = row.id || this.ids
      getEqu(id).then(response => {
        this.form1 = response.data
        this.form1.status1 = response.data.equOperation.status
        this.form1.illuminance = response.data.equOperation.illuminance
        this.form1.electricCurrent = response.data.equOperation.electricCurrent
        this.form1.electricTension = response.data.equOperation.electricTension
        this.title = '查看详情'
        this.open()
        // this.open1 = true
      })
    },
    cancel() {},
    submitForm() {}
  }
}
</script>
<style lang="scss" >
    .fen_control {
        .el-dialog__body {
          padding: 16px 20px;
        }
        .el-form-item__label {
          padding-bottom: 0;
        }
    }
</style>

